﻿#ifndef INSTRUCTIONTURNTABLEPOSITIONMODE
#define INSTRUCTIONTURNTABLEPOSITIONMODE

#include "ScriptInstruction.h"

class InstructionTurnTablePositionMode :public ScriptInstruction
{
  Q_OBJECT
private://property
  float position = 0;
  float rate = 0;
  float acceleration = 0;
private:
  static const int byteArraySize=sizeof (position)+sizeof (rate)+sizeof (acceleration);//除去指令类型标识符后的数据大小
public:
  explicit InstructionTurnTablePositionMode();
  InstructionTurnTablePositionMode(InstructionTurnTablePositionMode const& instructionTurnTablePositionMode);
  InstructionTurnTablePositionMode& operator=(InstructionTurnTablePositionMode const & instructionTurnTablePositionMode);
  virtual ~InstructionTurnTablePositionMode();
public:
  virtual QString toString()override;
  virtual QByteArray toByteArray() override;
  virtual InstructionTurnTablePositionMode* clone()override;
  static ScriptInstruction* fromByteArray1(char * const src,int size,int * offset);
public://geter and seter
  float getPosition();
  InstructionTurnTablePositionMode* setPosition(float position);
  float getRate();
  InstructionTurnTablePositionMode* setRate(float rate);
  float getAcceleration();
  InstructionTurnTablePositionMode* setAcceleration(float acceleration);
};
#endif
